<extend name="Base/common"/>
<block name="header">
    <include file="Public/_nav"/>
    <link type="text/css" rel="stylesheet" href="__CSS__/course.css"/>
    
</block>

<block name="body">
    <!--登录后显示个人区域-->
     <div class="col-md-2">           
           <include file="Public/sidebar"  />
     </div>
     <!--/登录后显示个人区域-->
     <div class="col-md-10 content-bordered">
     <div class="row">          
         <include file="_tab"/>
          <div class="white-box"> 
             <!-- <legend>{$thistitle}</legend>   -->  
          <h3><i class="icon-user"></i>{$thistitle}</h3> 
          <!--班级列表表单start-->                 
          <form class="form-horizontal form-condensed" role="form" method="post" id="classform" name="classform" action="">          
                 <div class="form-group">
                    <label class="col-md-2 control-label required">班 级：</label>
                      <div class="col-md-6">
                         <select name="bj_code" class="form-control"  style="width:210px;" role="form" onchange="this.form.submit()">
                            
                             <volist name="classlist" id="v">
                                <option value="{$v.bj_code}" <if condition="$cur eq $v['bj_code']">selected</if>>{$v.bj_name}</option>            
                             </volist>                          
                        </select>
                      </div> 
                      <input id="submit" class="btn btn-primary" value="提交"  type="submit" >
                    </div>
             </form>
              <!--班级列表表单end--> 
              <!--学生列表form start-->
              <form class="form-horizontal form-condensed" role="form" method="post" id="stform" name="classform" action=""> 
              <div class="row">
                     <div class="col-md-10">
                       <table class="table table-bordered">
                       <thead>
                       <tr>
                       <th> <div class="checkbox">
                            <label> <input id="check_all" type="checkbox" class="check-all"> 全选 </label>
                          </div>
                       </th>
                       <th>PC</th><th>姓名</th><th>最近登录</th><th>登录IP</th>
                       <th>学期总加分</th><th>#ID</th>
                       </tr>
                       </thead>
                       <volist name="list" id="v" >             
                       <tr>
                       <td><input class="ids" type="checkbox" name="ids[]" value="{$v.uid}"> {$i}</td>
                       <td>{$v.pc}</td>
                       <td>{$v.st_name}</td>
                       <td>{$v.last_login_time|time_format}</td>
                       <td>{$v.last_login_ip|long2ip}</td>
                       <td>{$v.score5}</td>
                       <td>{$v.uid}</td>
                        </tr>
                        </volist>
                        <tr>
                        <td> <div class="checkbox">
                            <label> <input type="checkbox" class="check-all"> 全选 </label>
                          </div>
                        </td>
                        <td colspan="4"><label class="col-md-5 control-label required">加分原因：</label>
                      <select name="inc_id" class="form-control"  style="width:150px;" role="form">
                     <volist name="scorelist" id="vo">
                     <option value="{$vo.id}">{$vo.title}</option>
                     </volist></select></td>
                 <td colspan="2">
                 <input type="submit" class="btn btn-primary" value="提交">&nbsp;&nbsp;&nbsp;&nbsp;
                 <input name="del" type="submit" class="btn btn-warning" value="重填">  
                 </td></tr>
                       </table>
                     </div>
                     </div>
               </form>
        <script>
           
            $(".check-all").on('click',function() {  
               $("input[name='ids[]']").prop("checked", this.checked);            
             });

            $(".ids, .check-all").on('click',function() {
            var $ids = $('[name="ids[]"]:checkbox');  
            $(".check-all").prop("checked" , $ids.length == $ids.filter(":checked").length);  
            }); 
          </script>
              </div>
              <!--学生列表form end-->
 </div>
</block>